<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>  
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'Room.jsp' starting page</title>
  </head>
  <body>
   <script type="text/javascript">
    $(document).ready(function(){
    	 var comet = new Auto.Comet({
             url : "/chatRoom.comet",  //连接地址
             async : true,                                        //是否异步接收数据
             accept : function(data) {                      //接收到数据的操作
                     //...
                     alert(data);
             }
           });
    	 comet.connection({
             userId : "id"
		     }, function() {
		             alert("连接成功！");
		     }, function() {
		             alert("连接失败！");
		     });
    });
  </script>
    <textarea id="text" rows="50" cols="100"></textarea>
  </body>
</html>
